/* This NetX test to test the ICMPv6 Echo request process.  */

#include    "tx_api.h"
#include    "nx_api.h"
extern void    test_control_return(UINT status);

#if defined(FEATURE_NX_IPV6) && defined(NX_ENABLE_IPV6_PATH_MTU_DISCOVERY)

#include    "nx_tcp.h"
#include    "nx_ip.h"
#include    "nx_ipv6.h"    
#include    "nx_icmpv6.h"
#include    "nx_ram_network_driver_test_1500.h"

#define     DEMO_STACK_SIZE    2048
#define     TEST_INTERFACE     1

/* Define the ThreadX and NetX object control blocks...  */

static TX_THREAD               thread_0;

static NX_PACKET_POOL          pool_0;
static NX_IP                   ip_0;

/* Define the counters used in the demo application...  */

static ULONG                   error_counter;
static ULONG                   packet_counter;
static ULONG                   echo_request_sent;


/* Define thread prototypes.  */
static void    thread_0_entry(ULONG thread_input);
extern void    test_control_return(UINT status);
extern void    _nx_ram_network_driver_1500(struct NX_IP_DRIVER_STRUCT *driver_req);
extern UINT    (*advanced_packet_process_callback)(NX_IP *ip_ptr, NX_PACKET *packet_ptr, UINT *operation_ptr, UINT *delay_ptr);
static UINT    my_packet_process(NX_IP *ip_ptr, NX_PACKET *packet_ptr, UINT *operation_ptr, UINT *delay_ptr);

/* Frame (118 bytes): RA */
static const unsigned char pkt1[118] = {
0x33, 0x33, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, /* 33...... */
0x00, 0x00, 0x01, 0x00, 0x86, 0xdd, 0x60, 0x00, /* ......`. */
0x00, 0x00, 0x00, 0x40, 0x3a, 0xff, 0xfe, 0x80, /* ...@:... */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, /* ........ */
0x00, 0xff, 0xfe, 0x00, 0x01, 0x00, 0xff, 0x02, /* ........ */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x86, 0x00, /* ........ */
0x9f, 0x75, 0x00, 0x00, 0x03, 0x20, 0x00, 0x00, /* .u... .. */
0x75, 0x30, 0x00, 0x00, 0x03, 0xe8, 0x01, 0x01, /* u0...... */
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x01, /* ........ */
0x00, 0x00, 0x00, 0x00, 0x05, 0xdc, 0x03, 0x04, /* ........ */
0x40, 0xc0, 0x00, 0x27, 0x8d, 0x00, 0x00, 0x09, /* @..'.... */
0x3a, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xfe, /* :.....?. */
0x05, 0x01, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, /* ........ */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00              /* ...... */
};

/* Frame (70 bytes): Echo Request 3ffe:501:ffff:100:200:ff:fe00:100  */
static const unsigned char pkt2[70] = {
0x00, 0x11, 0x22, 0x33, 0x44, 0x56, 0x00, 0x00, /* .."3DV.. */
0x00, 0x00, 0x01, 0x00, 0x86, 0xdd, 0x60, 0x00, /* ......`. */
0x00, 0x00, 0x00, 0x10, 0x3a, 0xff, 0x3f, 0xfe, /* ....:.?. */
0x05, 0x01, 0xff, 0xff, 0x01, 0x00, 0x02, 0x00, /* ........ */
0x00, 0xff, 0xfe, 0x00, 0x01, 0x00, 0x3f, 0xfe, /* ......?. */
0x05, 0x01, 0xff, 0xff, 0x01, 0x00, 0x02, 0x11, /* ........ */
0x22, 0xff, 0xfe, 0x33, 0x44, 0x56, 0x80, 0x00, /* "..3DV.. */
0x7a, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, /* z....... */
0x03, 0x04, 0x05, 0x06, 0x07, 0x08              /* ...... */
};

/* Frame (86 bytes): NS */
static const unsigned char pkt3[86] = {
0x33, 0x33, 0xff, 0x00, 0x01, 0x00, 0x00, 0x11, /* 33...... */
0x22, 0x33, 0x44, 0x56, 0x86, 0xdd, 0x60, 0x00, /* "3DV..`. */
0x00, 0x00, 0x00, 0x20, 0x3a, 0xff, 0x3f, 0xfe, /* ... :.?. */
0x05, 0x01, 0xff, 0xff, 0x01, 0x00, 0x02, 0x11, /* ........ */
0x22, 0xff, 0xfe, 0x33, 0x44, 0x56, 0xff, 0x02, /* "..3DV.. */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */
0x00, 0x01, 0xff, 0x00, 0x01, 0x00, 0x87, 0x00, /* ........ */
0x1c, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xfe, /* .l....?. */
0x05, 0x01, 0xff, 0xff, 0x01, 0x00, 0x02, 0x00, /* ........ */
0x00, 0xff, 0xfe, 0x00, 0x01, 0x00, 0x01, 0x01, /* ........ */
0x00, 0x11, 0x22, 0x33, 0x44, 0x56              /* .."3DV */
};

/* Frame (86 bytes): NA */
static const unsigned char pkt4[86] = {
0x00, 0x11, 0x22, 0x33, 0x44, 0x56, 0x00, 0x00, /* .."3DV.. */
0x00, 0x00, 0x01, 0x00, 0x86, 0xdd, 0x60, 0x00, /* ......`. */
0x00, 0x00, 0x00, 0x20, 0x3a, 0xff, 0x3f, 0xfe, /* ... :.?. */
0x05, 0x01, 0xff, 0xff, 0x01, 0x00, 0x02, 0x00, /* ........ */
0x00, 0xff, 0xfe, 0x00, 0x01, 0x00, 0x3f, 0xfe, /* ......?. */
0x05, 0x01, 0xff, 0xff, 0x01, 0x00, 0x02, 0x11, /* ........ */
0x22, 0xff, 0xfe, 0x33, 0x44, 0x56, 0x88, 0x00, /* "..3DV.. */
0x57, 0x0b, 0xe0, 0x00, 0x00, 0x00, 0x3f, 0xfe, /* W.....?. */
0x05, 0x01, 0xff, 0xff, 0x01, 0x00, 0x02, 0x00, /* ........ */
0x00, 0xff, 0xfe, 0x00, 0x01, 0x00, 0x02, 0x01, /* ........ */
0x00, 0x00, 0x00, 0x00, 0x01, 0x00              /* ...... */
};

/* Frame (70 bytes): Echo Reply 3ffe:501:ffff:100:200:ff:fe00:100  */
static const unsigned char pkt5[70] = {
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x11, /* ........ */
0x22, 0x33, 0x44, 0x56, 0x86, 0xdd, 0x60, 0x00, /* "3DV..`. */
0x00, 0x00, 0x00, 0x10, 0x3a, 0xff, 0x3f, 0xfe, /* ....:.?. */
0x05, 0x01, 0xff, 0xff, 0x01, 0x00, 0x02, 0x11, /* ........ */
0x22, 0xff, 0xfe, 0x33, 0x44, 0x56, 0x3f, 0xfe, /* "..3DV?. */
0x05, 0x01, 0xff, 0xff, 0x01, 0x00, 0x02, 0x00, /* ........ */
0x00, 0xff, 0xfe, 0x00, 0x01, 0x00, 0x81, 0x00, /* ........ */
0x79, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, /* y....... */
0x03, 0x04, 0x05, 0x06, 0x07, 0x08              /* ...... */
};
 
/* Frame (1294 bytes): Echo Request 3ffe:501:ffff:102:200:ff:fe00:a2a2 */
static const unsigned char pkt6[1294] = {
0x00, 0x11, 0x22, 0x33, 0x44, 0x56, 0x00, 0x00, /* .."3DV.. */
0x00, 0x00, 0x01, 0x00, 0x86, 0xdd, 0x60, 0x00, /* ......`. */
0x00, 0x00, 0x04, 0xd8, 0x3a, 0xff, 0x3f, 0xfe, /* ....:.?. */
0x05, 0x01, 0xff, 0xff, 0x01, 0x02, 0x02, 0x00, /* ........ */
0x00, 0xff, 0xfe, 0x00, 0xa2, 0xa2, 0x3f, 0xfe, /* ......?. */
0x05, 0x01, 0xff, 0xff, 0x01, 0x00, 0x02, 0x11, /* ........ */
0x22, 0xff, 0xfe, 0x33, 0x44, 0x56, 0x80, 0x00, /* "..3DV.. */
0xd4, 0x9f, 0xff, 0xff, 0x00, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05              /* ...... */
};

/* Frame (1294 bytes): Echo Reply, 3ffe:501:ffff:102:200:ff:fe00:a2a2 */
static const unsigned char pkt7[1294] = {
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x11, /* ........ */
0x22, 0x33, 0x44, 0x56, 0x86, 0xdd, 0x60, 0x00, /* "3DV..`. */
0x00, 0x00, 0x04, 0xd8, 0x3a, 0xff, 0x3f, 0xfe, /* ....:.?. */
0x05, 0x01, 0xff, 0xff, 0x01, 0x00, 0x02, 0x11, /* ........ */
0x22, 0xff, 0xfe, 0x33, 0x44, 0x56, 0x3f, 0xfe, /* "..3DV?. */
0x05, 0x01, 0xff, 0xff, 0x01, 0x02, 0x02, 0x00, /* ........ */
0x00, 0xff, 0xfe, 0x00, 0xa2, 0xa2, 0x81, 0x00, /* ........ */
0xd3, 0x9f, 0xff, 0xff, 0x00, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05              /* ...... */
};

/* Frame (1294 bytes): Packet Too Big, MTU 56, 3ffe:501:ffff:100:200:ff:fe00:100  */
static const unsigned char pkt8[1294] = {
0x00, 0x11, 0x22, 0x33, 0x44, 0x56, 0x00, 0x00, /* .."3DV.. */
0x00, 0x00, 0x01, 0x00, 0x86, 0xdd, 0x60, 0x00, /* ......`. */
0x00, 0x00, 0x04, 0xd8, 0x3a, 0x40, 0x3f, 0xfe, /* ....:@?. */
0x05, 0x01, 0xff, 0xff, 0x01, 0x00, 0x02, 0x00, /* ........ */
0x00, 0xff, 0xfe, 0x00, 0x01, 0x00, 0x3f, 0xfe, /* ......?. */
0x05, 0x01, 0xff, 0xff, 0x01, 0x00, 0x02, 0x11, /* ........ */
0x22, 0xff, 0xfe, 0x33, 0x44, 0x56, 0x02, 0x00, /* "..3DV.. */
0xe1, 0x8e, 0x00, 0x00, 0x00, 0x38, 0x60, 0x00, /* .....8`. */
0x00, 0x00, 0x04, 0xd8, 0x3a, 0x40, 0x3f, 0xfe, /* ....:@?. */
0x05, 0x01, 0xff, 0xff, 0x01, 0x00, 0x02, 0x11, /* ........ */
0x22, 0xff, 0xfe, 0x33, 0x44, 0x56, 0x3f, 0xfe, /* "..3DV?. */
0x05, 0x01, 0xff, 0xff, 0x01, 0x02, 0x02, 0x00, /* ........ */
0x00, 0xff, 0xfe, 0x00, 0xa2, 0xa2, 0x81, 0x00, /* ........ */
0xd3, 0x9f, 0xff, 0xff, 0x00, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* ........ */
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* ........ */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, /* ........ */
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* ........ */
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* ........ */
0x05, 0x05, 0x05, 0x05, 0x05, 0x05              /* ...... */
};

/* Define what the initial system looks like.  */

#ifdef CTEST
VOID test_application_define(void *first_unused_memory)
#else
void           netx_icmpv6_destination_table_periodic_test_application_define(void *first_unused_memory)
#endif
{
CHAR       *pointer;
UINT       status;

    /* Setup the working pointer.  */
    pointer = (CHAR *) first_unused_memory;

    error_counter = 0;
    packet_counter = 0;
    echo_request_sent = 0;

    /* Create the main thread.  */
    tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,  
        pointer, DEMO_STACK_SIZE, 
        4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);

    pointer = pointer + DEMO_STACK_SIZE;

    /* Initialize the NetX system.  */
    nx_system_initialize();

    /* Create a packet pool.  */
    status = nx_packet_pool_create(&pool_0, "NetX Main Packet Pool", 1536, pointer, 1536*4);
    pointer = pointer + 1536*4;

    if(status)
        error_counter++;

    /* Create an IP instance.  */
    status = _nx_ip_create(&ip_0, "NetX IP Instance 0", IP_ADDRESS(1,2,3,4), 0xFFFFFF00UL, &pool_0, _nx_ram_network_driver_1500,
        pointer, 2048, 1);
    pointer = pointer + 2048;
                
    /* Check IP create status.  */
    if(status)
        error_counter++;

    /* Enable IPv6 */
    status = nxd_ipv6_enable(&ip_0);
                 
    /* Check IPv6 enable status.  */
    if(status)
        error_counter++;

    /* Enable ICMP for IP Instance 0 and 1.  */
    status = nxd_icmp_enable(&ip_0);

    /* Check ICMP enable status.  */
    if(status)
        error_counter++;

}

/* Define the test threads.  */

static void    thread_0_entry(ULONG thread_input)
{

UINT             status;
NX_PACKET       *packet_ptr;
NXD_ADDRESS      dest_ip;
CHAR             mac[6];
    
    /* Print out test information banner.  */
    printf("NetX Test:   ICMPv6 Destination Table Periodic Test....................");

    /* Set the linklocal address*/
    status = nxd_ipv6_address_set(&ip_0, 0, NX_NULL, 10, NX_NULL);
       
    /* Check the status.  */
    if (status)
    {
        printf("ERROR!\n");
        test_control_return(1);
    }                        
    
    /* Waiting for DAD.  */
    tx_thread_sleep(5 * NX_IP_PERIODIC_RATE);

    /* Setup filter function to check whether the packet is sent from ip_0. */
    advanced_packet_process_callback = my_packet_process;

    /* Set the destination address and mac address.  */
    dest_ip.nxd_ip_version = NX_IP_VERSION_V6;
    dest_ip.nxd_ip_address.v6[0] = 0xfe800000;
    dest_ip.nxd_ip_address.v6[1] = 0x00000000;
    dest_ip.nxd_ip_address.v6[2] = 0x020000ff;
    dest_ip.nxd_ip_address.v6[3] = 0xfe000100;
    mac[0] = 0;
    mac[1] = 0;
    mac[2] = 0;
    mac[3] = 0;
    mac[4] = 1;
    mac[5] = 0;

    /* Added ND Cache Entry.  */
    status = nxd_nd_cache_entry_set(&ip_0, dest_ip.nxd_ip_address.v6, 0, mac);

    /* Check status */
    if(status)
        error_counter ++;

    /* Send ICMPv6 RA to ip_0. */
    /* The source address is fe80::200:ff:fe00:100. */
    /* The destination address is ff02::1. */

    /* Allocate one packet.  */
    status = nx_packet_allocate(&pool_0, &packet_ptr, NX_RECEIVE_PACKET, NX_WAIT_FOREVER);

    /* Check status */
    if(status)
        error_counter ++;

    /* Fill in the packet with data. Skip the MAC header.  */
    memcpy(packet_ptr -> nx_packet_prepend_ptr, &pkt1[14], sizeof(pkt1) - 14);
    packet_ptr -> nx_packet_length = sizeof(pkt1) - 14;
    packet_ptr -> nx_packet_append_ptr = packet_ptr -> nx_packet_prepend_ptr + packet_ptr -> nx_packet_length;

    /* Directly receive the ICMPv6 RA packet.  */
    _nx_ip_packet_receive(&ip_0, packet_ptr);

    /* Waiting for DAD. */
    tx_thread_sleep(5 * NX_IP_PERIODIC_RATE);
                                               
    /* Check the destination table.  the destination address is fe80::200:ff:fe00:100. */
    if ((ip_0.nx_ipv6_destination_table_size != 1) ||
        (ip_0.nx_ipv6_destination_table[0].nx_ipv6_destination_entry_destination_address[0] != 0xfe800000) ||
        (ip_0.nx_ipv6_destination_table[0].nx_ipv6_destination_entry_destination_address[1] != 0x00000000) ||
        (ip_0.nx_ipv6_destination_table[0].nx_ipv6_destination_entry_destination_address[2] != 0x020000ff) ||
        (ip_0.nx_ipv6_destination_table[0].nx_ipv6_destination_entry_destination_address[3] != 0xfe000100) ||
        (ip_0.nx_ipv6_destination_table[0].nx_ipv6_destination_entry_path_mtu != 1500) || 
        (ip_0.nx_ipv6_destination_table[0].nx_ipv6_destination_entry_MTU_timer_tick != NX_WAIT_FOREVER))
        error_counter ++;   

    /* Send ICMPv6 Echo Request to ip_0. */
    /* The source address is 3ffe:501:ffff:100:200:ff:fe00:100. */
    /* The destination address is 3ffe:501:ffff:100:211:22ff:fe33:4456. */

    /* Allocate one packet.  */
    status = nx_packet_allocate(&pool_0, &packet_ptr, NX_RECEIVE_PACKET, NX_WAIT_FOREVER);

    /* Check status */
    if(status)
        error_counter ++;

    /* Fill in the packet with data. Skip the MAC header.  */
    memcpy(packet_ptr -> nx_packet_prepend_ptr, &pkt2[14], sizeof(pkt2) - 14);
    packet_ptr -> nx_packet_length = sizeof(pkt2) - 14;
    packet_ptr -> nx_packet_append_ptr = packet_ptr -> nx_packet_prepend_ptr + packet_ptr -> nx_packet_length;

    /* Directly receive the ICMPv6 Echo Request packet.  */
    _nx_ip_packet_receive(&ip_0, packet_ptr);

    /* Sleep 1 second to check NS, inject NA and check Echo Reply. */
    tx_thread_sleep(NX_IP_PERIODIC_RATE);

    /* Check the destination table.  */
    if ((ip_0.nx_ipv6_destination_table_size != 2) ||
        (ip_0.nx_ipv6_destination_table[0].nx_ipv6_destination_entry_destination_address[0] != 0xfe800000) ||
        (ip_0.nx_ipv6_destination_table[0].nx_ipv6_destination_entry_destination_address[1] != 0x00000000) ||
        (ip_0.nx_ipv6_destination_table[0].nx_ipv6_destination_entry_destination_address[2] != 0x020000ff) ||
        (ip_0.nx_ipv6_destination_table[0].nx_ipv6_destination_entry_destination_address[3] != 0xfe000100) ||
        (ip_0.nx_ipv6_destination_table[0].nx_ipv6_destination_entry_path_mtu != 1500) ||
        (ip_0.nx_ipv6_destination_table[0].nx_ipv6_destination_entry_MTU_timer_tick != NX_WAIT_FOREVER) ||
        (ip_0.nx_ipv6_destination_table[1].nx_ipv6_destination_entry_destination_address[0] != 0x3ffe0501) ||
        (ip_0.nx_ipv6_destination_table[1].nx_ipv6_destination_entry_destination_address[1] != 0xffff0100) ||
        (ip_0.nx_ipv6_destination_table[1].nx_ipv6_destination_entry_destination_address[2] != 0x020000ff) ||
        (ip_0.nx_ipv6_destination_table[1].nx_ipv6_destination_entry_destination_address[3] != 0xfe000100) ||
        (ip_0.nx_ipv6_destination_table[1].nx_ipv6_destination_entry_path_mtu != 1500) || 
        (ip_0.nx_ipv6_destination_table[1].nx_ipv6_destination_entry_MTU_timer_tick != NX_WAIT_FOREVER))
        error_counter ++;   

    /* Send ICMPv6 Echo Request to ip_0. */
    /* The source address is 3ffe:501:ffff:102:200:ff:fe00:a2a2. */
    /* The destination address is 3ffe:501:ffff:100:211:22ff:fe33:4456. */

    /* Allocate one packet.  */
    status = nx_packet_allocate(&pool_0, &packet_ptr, NX_RECEIVE_PACKET, NX_WAIT_FOREVER);

    /* Check status */
    if(status)
        error_counter ++;

    /* Fill in the packet with data. Skip the MAC header.  */
    memcpy(packet_ptr -> nx_packet_prepend_ptr, &pkt6[14], sizeof(pkt6) - 14);
    packet_ptr -> nx_packet_length = sizeof(pkt6) - 14;
    packet_ptr -> nx_packet_append_ptr = packet_ptr -> nx_packet_prepend_ptr + packet_ptr -> nx_packet_length;

    /* Directly receive the ICMPv6 Echo Request packet.  */
    _nx_ip_packet_receive(&ip_0, packet_ptr);
              
    /* Sleep 1 second to check Echo Reply. */
    tx_thread_sleep(NX_IP_PERIODIC_RATE);

    /* Check the destination table.  */
    if ((ip_0.nx_ipv6_destination_table_size != 3) ||
        (ip_0.nx_ipv6_destination_table[0].nx_ipv6_destination_entry_destination_address[0] != 0xfe800000) ||
        (ip_0.nx_ipv6_destination_table[0].nx_ipv6_destination_entry_destination_address[1] != 0x00000000) ||
        (ip_0.nx_ipv6_destination_table[0].nx_ipv6_destination_entry_destination_address[2] != 0x020000ff) ||
        (ip_0.nx_ipv6_destination_table[0].nx_ipv6_destination_entry_destination_address[3] != 0xfe000100) ||
        (ip_0.nx_ipv6_destination_table[0].nx_ipv6_destination_entry_path_mtu != 1500) ||
        (ip_0.nx_ipv6_destination_table[0].nx_ipv6_destination_entry_MTU_timer_tick != NX_WAIT_FOREVER) ||
        (ip_0.nx_ipv6_destination_table[1].nx_ipv6_destination_entry_destination_address[0] != 0x3ffe0501) ||
        (ip_0.nx_ipv6_destination_table[1].nx_ipv6_destination_entry_destination_address[1] != 0xffff0100) ||
        (ip_0.nx_ipv6_destination_table[1].nx_ipv6_destination_entry_destination_address[2] != 0x020000ff) ||
        (ip_0.nx_ipv6_destination_table[1].nx_ipv6_destination_entry_destination_address[3] != 0xfe000100) ||
        (ip_0.nx_ipv6_destination_table[1].nx_ipv6_destination_entry_path_mtu != 1500) || 
        (ip_0.nx_ipv6_destination_table[1].nx_ipv6_destination_entry_MTU_timer_tick != NX_WAIT_FOREVER) ||
        (ip_0.nx_ipv6_destination_table[2].nx_ipv6_destination_entry_destination_address[0] != 0x3ffe0501) ||
        (ip_0.nx_ipv6_destination_table[2].nx_ipv6_destination_entry_destination_address[1] != 0xffff0102) ||
        (ip_0.nx_ipv6_destination_table[2].nx_ipv6_destination_entry_destination_address[2] != 0x020000ff) ||
        (ip_0.nx_ipv6_destination_table[2].nx_ipv6_destination_entry_destination_address[3] != 0xfe00a2a2) ||
        (ip_0.nx_ipv6_destination_table[2].nx_ipv6_destination_entry_path_mtu != 1500) || 
        (ip_0.nx_ipv6_destination_table[2].nx_ipv6_destination_entry_MTU_timer_tick != NX_WAIT_FOREVER))
        error_counter ++;
                                
    /* Send ICMPv6 Packet too big packet with MTU 56 to ip_0. */
    /* The source address is 0x3ffe:501:ffff:100:200:ff:fe00:100. */
    /* The destination address is 0x3ffe:501:ffff:100:211:22ff:fe33:4456. */

    /* Allocate one packet.  */
    status = nx_packet_allocate(&pool_0, &packet_ptr, NX_RECEIVE_PACKET, NX_WAIT_FOREVER);

    /* Check status */
    if(status)
        error_counter ++;

    /* Fill in the packet with data. Skip the MAC header.  */
    memcpy(packet_ptr -> nx_packet_prepend_ptr, &pkt8[14], sizeof(pkt8) - 14);
    packet_ptr -> nx_packet_length = sizeof(pkt8) - 14;
    packet_ptr -> nx_packet_append_ptr = packet_ptr -> nx_packet_prepend_ptr + packet_ptr -> nx_packet_length;

    /* Directly receive the ICMPv6 Packet too big packet.  */
    _nx_ip_packet_receive(&ip_0, packet_ptr);

    /* Check the destination table.  */
    if ((ip_0.nx_ipv6_destination_table_size != 3) ||
        (ip_0.nx_ipv6_destination_table[0].nx_ipv6_destination_entry_destination_address[0] != 0xfe800000) ||
        (ip_0.nx_ipv6_destination_table[0].nx_ipv6_destination_entry_destination_address[1] != 0x00000000) ||
        (ip_0.nx_ipv6_destination_table[0].nx_ipv6_destination_entry_destination_address[2] != 0x020000ff) ||
        (ip_0.nx_ipv6_destination_table[0].nx_ipv6_destination_entry_destination_address[3] != 0xfe000100) ||
        (ip_0.nx_ipv6_destination_table[0].nx_ipv6_destination_entry_path_mtu != 1500) ||
        (ip_0.nx_ipv6_destination_table[0].nx_ipv6_destination_entry_MTU_timer_tick != NX_WAIT_FOREVER) ||
        (ip_0.nx_ipv6_destination_table[1].nx_ipv6_destination_entry_destination_address[0] != 0x3ffe0501) ||
        (ip_0.nx_ipv6_destination_table[1].nx_ipv6_destination_entry_destination_address[1] != 0xffff0100) ||
        (ip_0.nx_ipv6_destination_table[1].nx_ipv6_destination_entry_destination_address[2] != 0x020000ff) ||
        (ip_0.nx_ipv6_destination_table[1].nx_ipv6_destination_entry_destination_address[3] != 0xfe000100) ||
        (ip_0.nx_ipv6_destination_table[1].nx_ipv6_destination_entry_path_mtu != 1500) || 
        (ip_0.nx_ipv6_destination_table[1].nx_ipv6_destination_entry_MTU_timer_tick != NX_WAIT_FOREVER) ||
        (ip_0.nx_ipv6_destination_table[2].nx_ipv6_destination_entry_destination_address[0] != 0x3ffe0501) ||
        (ip_0.nx_ipv6_destination_table[2].nx_ipv6_destination_entry_destination_address[1] != 0xffff0102) ||
        (ip_0.nx_ipv6_destination_table[2].nx_ipv6_destination_entry_destination_address[2] != 0x020000ff) ||
        (ip_0.nx_ipv6_destination_table[2].nx_ipv6_destination_entry_destination_address[3] != 0xfe00a2a2) ||
        (ip_0.nx_ipv6_destination_table[2].nx_ipv6_destination_entry_path_mtu != 56) || 
        (ip_0.nx_ipv6_destination_table[2].nx_ipv6_destination_entry_MTU_timer_tick != NX_PATH_MTU_INCREASE_WAIT_INTERVAL_TICKS))
        error_counter ++;

    /* Sleep NX_PATH_MTU_INCREASE_WAIT_INTERVAL_TICKS to check destination table. */
#if (NX_IP_PERIODIC_RATE == 1000)
    /* Plus 10 ticks to for the deviation when defined NX_IP_PERIODIC_RATE as 1000.  */
    tx_thread_sleep(NX_PATH_MTU_INCREASE_WAIT_INTERVAL_TICKS + NX_IP_PERIODIC_RATE / 100);
#else
    tx_thread_sleep(NX_PATH_MTU_INCREASE_WAIT_INTERVAL_TICKS);
#endif

    /* Check the destination table.  */
    if ((ip_0.nx_ipv6_destination_table_size != 3) ||
        (ip_0.nx_ipv6_destination_table[0].nx_ipv6_destination_entry_destination_address[0] != 0xfe800000) ||
        (ip_0.nx_ipv6_destination_table[0].nx_ipv6_destination_entry_destination_address[1] != 0x00000000) ||
        (ip_0.nx_ipv6_destination_table[0].nx_ipv6_destination_entry_destination_address[2] != 0x020000ff) ||
        (ip_0.nx_ipv6_destination_table[0].nx_ipv6_destination_entry_destination_address[3] != 0xfe000100) ||
        (ip_0.nx_ipv6_destination_table[0].nx_ipv6_destination_entry_path_mtu != 1500) ||
        (ip_0.nx_ipv6_destination_table[0].nx_ipv6_destination_entry_MTU_timer_tick != NX_WAIT_FOREVER) ||
        (ip_0.nx_ipv6_destination_table[1].nx_ipv6_destination_entry_destination_address[0] != 0x3ffe0501) ||
        (ip_0.nx_ipv6_destination_table[1].nx_ipv6_destination_entry_destination_address[1] != 0xffff0100) ||
        (ip_0.nx_ipv6_destination_table[1].nx_ipv6_destination_entry_destination_address[2] != 0x020000ff) ||
        (ip_0.nx_ipv6_destination_table[1].nx_ipv6_destination_entry_destination_address[3] != 0xfe000100) ||
        (ip_0.nx_ipv6_destination_table[1].nx_ipv6_destination_entry_path_mtu != 1500) || 
        (ip_0.nx_ipv6_destination_table[1].nx_ipv6_destination_entry_MTU_timer_tick != NX_WAIT_FOREVER) ||
        (ip_0.nx_ipv6_destination_table[2].nx_ipv6_destination_entry_destination_address[0] != 0x3ffe0501) ||
        (ip_0.nx_ipv6_destination_table[2].nx_ipv6_destination_entry_destination_address[1] != 0xffff0102) ||
        (ip_0.nx_ipv6_destination_table[2].nx_ipv6_destination_entry_destination_address[2] != 0x020000ff) ||
        (ip_0.nx_ipv6_destination_table[2].nx_ipv6_destination_entry_destination_address[3] != 0xfe00a2a2) ||
        (ip_0.nx_ipv6_destination_table[2].nx_ipv6_destination_entry_path_mtu != 1500) || 
        (ip_0.nx_ipv6_destination_table[2].nx_ipv6_destination_entry_MTU_timer_tick != NX_WAIT_FOREVER))
        error_counter ++;

    /* Check error_counter and packet_counter.  */
    if ((error_counter) || (packet_counter != 3))
    {
        printf("ERROR!\n");
        test_control_return(1);
    }                        

    /* Out successful.  */
    printf("SUCCESS!\n");    
    test_control_return(0);
}                  


static UINT    my_packet_process(NX_IP *ip_ptr, NX_PACKET *packet_ptr, UINT *operation_ptr, UINT *delay_ptr)
{

UINT             status;
NX_PACKET       *my_packet;   

    /* Check whether it is an NS packet. */
    if ((packet_counter == 0) && (packet_ptr -> nx_packet_length == (sizeof(pkt3) - 14)))
    {

        /* Updated the packet counter.  */
        packet_counter ++;

        /* Send NA packet to ip_0. */                                        
        /* The source address is 0x3ffe:501:ffff:100:200:ff:fe00:100. */
        /* The destination address is 0x3ffe:501:ffff:100:211:22ff:fe33:4456. */

        /* Allocate one packet.  */
        status = nx_packet_allocate(&pool_0, &my_packet, NX_RECEIVE_PACKET, NX_WAIT_FOREVER);

        /* Check status */
        if(status)
            error_counter ++;

        /* Fill in the packet with data. Skip the MAC header.  */
        memcpy(my_packet -> nx_packet_prepend_ptr, &pkt4[14], sizeof(pkt4) - 14);
        my_packet -> nx_packet_length = sizeof(pkt4) - 14;
        my_packet -> nx_packet_append_ptr = my_packet -> nx_packet_prepend_ptr + packet_ptr -> nx_packet_length;

        /* Directly receive the ICMP redirect packet.  */
        _nx_ip_packet_receive(&ip_0, my_packet);     
    }

    /* Check whether it is an Echo Reply packet. */
    if ((packet_counter == 1) && (packet_ptr -> nx_packet_length == (sizeof(pkt5) - 14)))
    {

        /* Updated the packet counter.  */
        packet_counter ++;
    }

    /* Check whether it is an Echo Reply packet. */
    if ((packet_counter == 2) && (packet_ptr -> nx_packet_length == (sizeof(pkt7) - 14)))
    {

        /* Updated the packet counter.  */
        packet_counter ++;
    }

    return NX_TRUE;
}

#else

#ifdef CTEST
VOID test_application_define(void *first_unused_memory)
#else
void           netx_icmpv6_destination_table_periodic_test_application_define(void *first_unused_memory)
#endif
{

    /* Print out test information banner.  */
    printf("NetX Test:   ICMPv6 Destination Table Periodic Test....................N/A\n");

    test_control_return(3);         
}
#endif
